package com.srd.phone.mvp.presenters;

import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.srd.phone.application.HttpStringRequest;
import com.srd.phone.mvp.interfaces.IBaseView;


public class TabFundPresenter extends BasePresenter {

    public TabFundPresenter(RequestQueue requestQueue, IBaseView iView0) {
        super(requestQueue,iView0);
    }

    public void requestGetData(final String url, final String input, final String pwd, final String verify) {
        HttpStringRequest request = new HttpStringRequest(Request.Method.POST, url, new Response.Listener<String>() {
            @Override
            public void onResponse(String response) {
                iView.get().returnData(url, response);
            }
        }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                iView.get().onError(url, error);
            }
        });
        request.setTag(url);
        requestQueue.add(request);
    }

}
